package com.hanxiaozhang.base.service;

import com.hanxiaozhang.base.KeyValuePair;
import com.hanxiaozhang.base.dto.FileDTO;
import com.hanxiaozhang.base.entity.FileEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 文件表
 *
 * @author hanxiaozhang
 * @email hanxiaozhang2018@sina.com
 * @date 2021-05-02
 */
public interface FileService {

    FileDTO get(Long fileId);

    List<FileDTO> list(Map<String, Object> map);

    int update(FileEntity file);

    int remove(Long fileId);

    int batchRemove(Long[] fileIds);

    FileDTO uploadFile(MultipartFile file, String type, String fileTag) throws Exception;

    void batchUpdateBelongIdByFileId(List<KeyValuePair<Long, Long>> fileIdAndBelongIdList);


}
